<div>
    <div class="table-header mt5 clearfix ng-scope search">
        <span class="fl lh30 f14 mr25">渠道来源</span>
        <input class="input-text fl ng-pristine ng-untouched ng-valid" style="width: 470px;" type="text"
               placeholder="渠道名称" ng-model="keyword" ng-enter="filter.apply()"/>
        <a class="btn" href="javascript: void(0)" ng-click="getDitchSourceData(1)">搜索</a>
    </div>

    <div class="table-header mt20 clearfix ng-scope">
        <span class="fl lh30 f14">渠道来源列表</span>

        <div class="fr btn-group">
            <a href="javascript:void(0)" class="btn permission p-50040403-01"
               title="新增渠道来源"
               ui-dialog="新增渠道来源"
               ui-dialog-data="baseData"
               ui-dialog-show="ditchSourceSvr.initEditSourceDialog($data, $dialog,$dialogScope)"
               ui-dialog-ok="ditchSourceSvr.save($data, $dialog)"
               ui-dialog-cache="false"
               ui-dialog-url="source/edit.html"
                    >新增渠道来源</a>
        </div>
    </div>

    <div id="grid" class="table-wrap mt10" style="overflow: visible">
        <table width="100%" class="valign-t">
            <thead>
            <tr>
                <th width="35">序号</th>
                <th>渠道名称</th>
                <th width="100" class="text-center">二维码</th>
                <th width="230">详情</th>
                <th width="115" class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="record in ditchSourceSvr.ditchSources">
                <td height="40"><p ng-bind="$index + 1 + startPageIndex"></p></td>
                <td>{{ record.channel_name }}
                    <p class="c-gray" ng-if="record.business_type==0">关联公众号：{{ record.type_business_text }}</p>

                    <p class="c-gray" ng-if="record.business_type==1">关联项目：{{ record.type_business_text }}</p>
                </td>
                <td class="lh14 text-center">
                    <div style="position: relative;display: block;overflow:visible;">
                        <span class="showqr c-orange" ng-click="ditchSourceSvr.showQR = record.channel_source_id"
                              style="cursor:pointer"
                              ng-show="record.qr_code_img"
                                >物料推广</span>

                        <div class="top-userinfo-menu ng-hide" style="display: block;top:20px;z-index:1;"

                             ng-show="ditchSourceSvr.showQR == record.channel_source_id && record.qr_code_img"
                                >
                            <div class="top-userinfo-menu-list text-left" style="width:225px;">
                                <div class="form-group clearfix">
                                    <div class="col-sm-8" style="padding:0">
                                        <img style="width:150px;height:150px;" ng-src="{{record.qr_code_img}}"/>
                                    </div>
                                    <div class="col-sm-4" style="padding:0;line-height:180%;">
                                        <p class="mt10"><a clipboard href="javascript:void(0)"
                                                           data="{{ record.qr_code_url}}" aftercopy="aftercopyNotify"
                                                           style="color:#ff7713!important;">复制链接</a></p>

                                        <p><a style="color:#ff7713!important;" href="{{ record.qr_code_img}}"
                                              target="_blank">下载</a></p>
                                    </div>
                                </div>
                            </div>
                            <i class="top-userinfo-menu-arrow"></i>
                        </div>

                    </div>
                </td>
                <td>
                    <p class="mt10">粉丝:
                        <a href="javascript:void(0)"
                           title="查看粉丝"
                           ui-dialog="查看粉丝"
                           ui-dialog-data="{}"
                           ui-dialog-show="ditchSourceFunsSvr.initViewFunsDialog($data, $dialog,$dialogScope, record)"
                           ui-dialog-ok=""
                           ui-dialog-cache="false"
                           ui-dialog-url="source/view_funs.html"
                           class="mt5 c-orange ng-hide permission p-50040403-02-inline" ng-show="record.hover||true"
                                >{{record.fans_count|number}}</a>
                    </p>

                    <p class="mt10">经纪人:
                        <a href="javascript:void(0)"
                           title="查看经纪人"
                           ui-dialog="查看经纪人"
                           ui-dialog-data="{}"
                           ui-dialog-show="ditchSourceBrokerSvr.initViewBrokerDialog($data, $dialog,$dialogScope, record)"
                           ui-dialog-ok=""
                           ui-dialog-cache="false"
                           ui-dialog-url="source/view_brokers.html"
                           class="mt5 c-orange ng-hide permission p-50040403-02-inline" ng-show="record.hover||true"
                                >{{ record.regbroker_count|number }}</a>
                    </p>
                </td>
                <td>
                    <a href="javascript:void(0)"
                       title="编辑渠道来源"
                       ui-dialog="编辑渠道来源"
                       ui-dialog-data="{}"
                       ui-dialog-show="ditchSourceSvr.initEditSourceDialog($data, $dialog,$dialogScope, record)"
                       ui-dialog-ok="ditchSourceSvr.save($data, $dialog)"
                       ui-dialog-cache="false"
                       ui-dialog-url="source/edit.html"
                       class="mt5 c-orange ng-hide permission p-50040403-02-inline" ng-show="record.hover||true"
                            >编辑</a>

                </td>
            </tr>
            </tbody>
        </table>
        <div class="no-data" ng-if="ditchSourceSvr.ditchSources.length == 0"><span>暂无数据</span></div>
    </div>
    <div ui-pagination page-index="ditchSourceSvr.filter.pageIndex" page-size="ditchSourceSvr.filter.pageSize"
         total="ditchSourceSvr.total"
         changed="getDitchSourceData($pageIndex)"></div>
</div>
